<?php

namespace App\Http\Controllers\Common;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\App;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;

class TestController extends Controller
{


  /**
   * Display a listing of the resource.
   *
   * @return \Illuminate\Http\Response
   */
  public function __construct()
  { }

  public function test(Request $request,Response $response)
  {
    // $attachmentRepository = App::make('App\Repositories\Contracts\AttachmentRepositoryInterface');

    // $fileInfo = $attachmentRepository->localFileInfo(3);
    // if($fileInfo){
    //  echo $attachmentRepository->imageSize($fileInfo,500);
    // }
    // $data= json_decode('{"aa bb":"vvv"}');
    // var_dump($data);
    // $data->name="hello";
    // var_dump((array)$data);
    // var_dump(json_encode($data));
    // $request->session()->put('name', 'shaoming');
    // $value = $request->session()->get('name', 'default');
    // echo $value;
    // phpinfo();
    cache()->put("hello","1234",100);
    $value = cache()->get("hello");
    echo $value;
  }
}
